import request from '@/utils/request'

export function getOne(serialno) {
  return request({
    url: `/api/wsgArea/${serialno}`,
    method: 'get'
  })
}

export function addOne(serialno, data) {
  return request({
    url: `/api/wsgArea/${serialno}`,
    method: 'post',
    data
  })
}

export function updateOne(id, data) {
  return request({
    url: '/idata/cropDaily/' + id,
    method: 'patch',
    data
  })
}

export function deleteOne(id) {
  return request({
    url: '/idata/cropDaily/' + id,
    method: 'delete'
  })
}
